const Koa = require('koa');
const app = new Koa();


//第一层中间件
const respDurationMiddleware = require('./middleware/koa_response_duration');
app.use(respDurationMiddleware)

//第二层中间件
const respHeaderMiddleware = require('./middleware/koa_response_header');
app.use(respHeaderMiddleware)

//第三层中间件
const respDataMiddleware = require('./middleware/koa_response_data');
app.use(respDataMiddleware)

app.listen(3001, () => {
  console.log('Koa server is running on http://localhost:3001');
});